/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.uniminuto.edu.videominuto.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Juan
 */
@Embeddable
public class CalificacionPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "id_cliente")
    private int idCliente;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_video")
    private int idVideo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_tipo_calificaion")
    private int idTipoCalificaion;

    public CalificacionPK() {
    }

    public CalificacionPK(int idCliente, int idVideo, int idTipoCalificaion) {
        this.idCliente = idCliente;
        this.idVideo = idVideo;
        this.idTipoCalificaion = idTipoCalificaion;
    }

    public int getIdCliente() {
        return idCliente;
    }

    public void setIdCliente(int idCliente) {
        this.idCliente = idCliente;
    }

    public int getIdVideo() {
        return idVideo;
    }

    public void setIdVideo(int idVideo) {
        this.idVideo = idVideo;
    }

    public int getIdTipoCalificaion() {
        return idTipoCalificaion;
    }

    public void setIdTipoCalificaion(int idTipoCalificaion) {
        this.idTipoCalificaion = idTipoCalificaion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idCliente;
        hash += (int) idVideo;
        hash += (int) idTipoCalificaion;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CalificacionPK)) {
            return false;
        }
        CalificacionPK other = (CalificacionPK) object;
        if (this.idCliente != other.idCliente) {
            return false;
        }
        if (this.idVideo != other.idVideo) {
            return false;
        }
        if (this.idTipoCalificaion != other.idTipoCalificaion) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "co.uniminuto.edu.videominuto.entities.CalificacionPK[ idCliente=" + idCliente + ", idVideo=" + idVideo + ", idTipoCalificaion=" + idTipoCalificaion + " ]";
    }
    
}
